package ro.isdc.training.jpa.course.domain;

import ro.isdc.training.jpa.misc.domain.BusinessEntityId;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Course identifier that can be the entity id or the name of the course
 * 
 * @author Andrei Chirila
 */
public class CourseId extends BusinessEntityId {
  /**
   * Generated Serial Version UID
   */
  private static final long serialVersionUID = 9081321068348034698L;
  
  /**
   * Name of the course that identifies uniquely the course.
   */
  private String courseName;

  /**
   * @return the courseName
   */
  public String getCourseName() {
    return courseName;
  }

  /**
   * @param courseName the courseName to set
   */
  public void setCourseName(final String courseName) {
    this.courseName = courseName;
  }

  /**
   * @see java.lang.Object#toString()
   */
  public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append(
        "courseName", this.courseName).append("versionNo", this.getVersionNo())
        .append("entityId", this.getEntityId()).toString();

  }
 
}
